Create a Web Application for an ETF Analyzer¶

In this Challenge assignment, you’ll build a financial database and web application by using SQL, Python, and the Voilà library to analyze the performance of a hypothetical fintech ETF.

Instructions:

Use this notebook to complete your analysis of a fintech ETF that consists of four stocks: GOST, GS, PYPL, and SQ. Each stock has its own table in the etf.db database, which the Starter_Code folder also contains.

Analyze the daily returns of the ETF stocks both individually and as a whole. Then deploy the visualizations to a web application by using the Voilà library.

The detailed instructions are divided into the following parts:

  • Analyze a single asset in the ETF

  • Optimize data access with Advanced SQL queries

  • Analyze the ETF portfolio

  • Deploy the notebook as a web application

Analyze a Single Asset in the ETF¶

For this part of the assignment, you’ll use SQL queries with Python, Pandas, and hvPlot to analyze the performance of a single asset from the ETF.

Complete the following steps:

  1. Write a SQL SELECT statement by using an f-string that reads all the PYPL data from the database. Using the SQL SELECT statement, execute a query that reads the PYPL data from the database into a Pandas DataFrame.

  2. Use the head and tail functions to review the first five and the last five rows of the DataFrame. Make a note of the beginning and end dates that are available from this dataset. You’ll use this information to complete your analysis.

  3. Using hvPlot, create an interactive visualization for the PYPL daily returns. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.

  4. Using hvPlot, create an interactive visualization for the PYPL cumulative returns. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.

Optimize Data Access with Advanced SQL Queries¶

For this part of the assignment, you’ll continue to analyze a single asset (PYPL) from the ETF. You’ll use advanced SQL queries to optimize the efficiency of accessing data from the database.

Complete the following steps:

  1. Access the closing prices for PYPL that are greater than 200 by completing the following steps:

    • Write a SQL SELECT statement to select the dates where the PYPL closing price was higher than 200.0.

    • Using the SQL statement, read the data from the database into a Pandas DataFrame, and then review the resulting DataFrame.

    • Select the “time” and “close” columns for those dates where the closing price was higher than 200.0.

  2. Find the top 10 daily returns for PYPL by completing the following steps:

    • Write a SQL statement to find the top 10 PYPL daily returns. Make sure to do the following:

      • Use SELECT to select only the “time” and “daily_returns” columns.

      • Use ORDER to sort the results in descending order by the “daily_returns” column.

      • Use LIMIT to limit the results to the top 10 daily return values.

    • Using the SQL statement, read the data from the database into a Pandas DataFrame, and then review the resulting DataFrame.

Analyze the ETF Portfolio¶

For this part of the assignment, you’ll build the entire ETF portfolio and then evaluate its performance. To do so, you’ll build the ETF portfolio by using SQL joins to combine all the data for each asset.

Complete the following steps:

  1. Write a SQL query to join each table in the portfolio into a single DataFrame. To do so, complete the following steps:

    • Use a SQL inner join to join each table on the “time” column. Access the “time” column in the GDOT table via the GDOT.time syntax. Access the “time” columns from the other tables via similar syntax.

    • Using the SQL query, read the data from the database into a Pandas DataFrame. Review the resulting DataFrame.

  2. Create a DataFrame that averages the “daily_returns” columns for all four assets. Review the resulting DataFrame.

    Hint Assuming that this ETF contains equally weighted returns, you can average the returns for each asset to get the average returns of the portfolio. You can then use the average returns of the portfolio to calculate the annualized returns and the cumulative returns. For the calculation to get the average daily returns for the portfolio, use the following code:

    etf_portfolio_returns = etf_portfolio['daily_returns'].mean(axis=1)
    

    You can use the average daily returns of the portfolio the same way that you used the daily returns of a single asset.

  3. Use the average daily returns in the etf_portfolio_returns DataFrame to calculate the annualized returns for the portfolio. Display the annualized return value of the ETF portfolio.

Hint To calculate the annualized returns, multiply the mean of the etf_portfolio_returns values by 252.

To convert the decimal values to percentages, multiply the results by 100.

  1. Use the average daily returns in the etf_portfolio_returns DataFrame to calculate the cumulative returns of the ETF portfolio.

  2. Using hvPlot, create an interactive line plot that visualizes the cumulative return values of the ETF portfolio. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.

Deploy the Notebook as a Web Application¶

For this part of the assignment, complete the following steps:

  1. Use the Voilà library to deploy your notebook as a web application. You can deploy the web application locally on your computer.

  2. Take a screen recording or screenshots to show how the web application appears when using Voilà. Include the recording or screenshots in the README.md file for your GitHub repository.

Review the following code which imports the required libraries, initiates your SQLite database, popluates the database with records from the etf.db seed file that was included in your Starter_Code folder, creates the database engine, and confirms that data tables that it now contains.¶

['GDOT', 'GS', 'PYPL', 'SQ']

Analyze a single asset in the FinTech ETF¶

For this part of the assignment, you’ll use SQL queries with Python, Pandas, and hvPlot to analyze the performance of a single asset from the ETF.

Complete the following steps:

  1. Write a SQL SELECT statement by using an f-string that reads all the PYPL data from the database. Using the SQL SELECT statement, execute a query that reads the PYPL data from the database into a Pandas DataFrame.

  2. Use the head and tail functions to review the first five and the last five rows of the DataFrame. Make a note of the beginning and end dates that are available from this dataset. You’ll use this information to complete your analysis.

  3. Using hvPlot, create an interactive visualization for the PYPL daily returns. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.

  4. Using hvPlot, create an interactive visualization for the PYPL cumulative returns. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.

Step 1: Write a SQL SELECT statement by using an f-string that reads all the PYPL data from the database. Using the SQL SELECT statement, execute a query that reads the PYPL data from the database into a Pandas DataFrame.¶

Step 2: Use the head and tail functions to review the first five and the last five rows of the DataFrame. Make a note of the beginning and end dates that are available from this dataset. You’ll use this information to complete your analysis.¶

open high low close volume daily_returns
time
2016-12-16 39.90 39.90 39.12 39.32 7298861 -0.005564
2016-12-19 39.40 39.80 39.11 39.45 3436478 0.003306
2016-12-20 39.61 39.74 39.26 39.74 2940991 0.007351
2016-12-21 39.84 40.74 39.82 40.09 5826704 0.008807
2016-12-22 40.04 40.09 39.54 39.68 4338385 -0.010227
open high low close volume daily_returns
time
2020-11-30 212.51 215.83 207.0900 214.200 8992681 0.013629
2020-12-01 217.15 220.57 214.3401 216.520 9148174 0.010831
2020-12-02 215.60 215.75 210.5000 212.660 6414746 -0.017827
2020-12-03 213.33 216.93 213.1100 214.680 6463339 0.009499
2020-12-04 214.88 217.28 213.0100 217.235 2118319 0.011901

Step 3: Using hvPlot, create an interactive visualization for the PYPL daily returns. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.¶

time:
2017-02-28 00:00:00
daily_returns:
-1.478e-2

Step 4: Using hvPlot, create an interactive visualization for the PYPL cumulative returns. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.¶

Optimize the SQL Queries¶

For this part of the assignment, you’ll continue to analyze a single asset (PYPL) from the ETF. You’ll use advanced SQL queries to optimize the efficiency of accessing data from the database.

Complete the following steps:

  1. Access the closing prices for PYPL that are greater than 200 by completing the following steps:

  2. Access the closing prices for PYPL that are greater than 200 by completing the following steps:

    • Write a SQL SELECT statement to select the dates where the PYPL closing price was higher than 200.0.

    • Select the “time” and “close” columns for those dates where the closing price was higher than 200.0.

    • Using the SQL statement, read the data from the database into a Pandas DataFrame, and then review the resulting DataFrame.

  3. Find the top 10 daily returns for PYPL by completing the following steps:

    • Write a SQL statement to find the top 10 PYPL daily returns. Make sure to do the following:

      • Use SELECT to select only the “time” and “daily_returns” columns.

      • Use ORDER to sort the results in descending order by the “daily_returns” column.

      • Use LIMIT to limit the results to the top 10 daily return values.

    • Using the SQL statement, read the data from the database into a Pandas DataFrame, and then review the resulting DataFrame.

Step 1: Access the closing prices for PYPL that are greater than 200 by completing the following steps:¶

- Write a SQL `SELECT` statement to select the dates where the PYPL closing price was higher than 200.0.

- Select the “time” and “close” columns for those dates where the closing price was higher than 200.0.

- Using the SQL statement, read the data from the database into a Pandas DataFrame, and then review the resulting DataFrame.
close
time
2020-08-05 202.920
2020-08-06 204.090
2020-08-25 201.710
2020-08-26 203.530
2020-08-27 204.340
2020-08-28 204.480
2020-08-31 203.950
2020-09-01 208.920
2020-09-02 210.820
2020-09-03 205.070
2020-10-12 201.500
2020-10-13 207.730
2020-10-14 203.660
2020-10-15 203.170
2020-10-16 204.540
2020-10-19 200.050
2020-10-20 201.960
2020-10-21 213.060
2020-10-22 203.880
2020-10-23 203.040
2020-10-27 200.440
2020-11-05 204.590
2020-11-06 202.720
2020-11-23 200.820
2020-11-24 206.000
2020-11-25 214.380
2020-11-27 211.320
2020-11-30 214.200
2020-12-01 216.520
2020-12-02 212.660
2020-12-03 214.680
2020-12-04 217.235

Step 2: Find the top 10 daily returns for PYPL by completing the following steps:¶

-  Write a SQL statement to find the top 10 PYPL daily returns. Make sure to do the following:

    * Use `SELECT` to select only the “time” and “daily_returns” columns.

    * Use `ORDER` to sort the results in descending order by the “daily_returns” column.

    * Use `LIMIT` to limit the results to the top 10 daily return values.

- Using the SQL statement, read the data from the database into a Pandas DataFrame, and then review the resulting DataFrame.
daily_returns
time
2020-03-24 0.140981
2020-05-07 0.140318
2020-03-13 0.138700
2020-04-06 0.100877
2018-10-19 0.093371
2019-10-24 0.085912
2020-11-04 0.080986
2020-03-10 0.080863
2020-04-22 0.075321
2018-12-26 0.074656

Analyze the Fintech ETF Portfolio¶

For this part of the assignment, you’ll build the entire ETF portfolio and then evaluate its performance. To do so, you’ll build the ETF portfolio by using SQL joins to combine all the data for each asset.

Complete the following steps:

  1. Write a SQL query to join each table in the portfolio into a single DataFrame. To do so, complete the following steps:

    • Use a SQL inner join to join each table on the “time” column. Access the “time” column in the GDOT table via the GDOT.time syntax. Access the “time” columns from the other tables via similar syntax.

    • Using the SQL query, read the data from the database into a Pandas DataFrame. Review the resulting DataFrame.

  2. Create a DataFrame that averages the “daily_returns” columns for all four assets. Review the resulting DataFrame.

    Hint Assuming that this ETF contains equally weighted returns, you can average the returns for each asset to get the average returns of the portfolio. You can then use the average returns of the portfolio to calculate the annualized returns and the cumulative returns. For the calculation to get the average daily returns for the portfolio, use the following code:

    etf_portfolio_returns = etf_portfolio['daily_returns'].mean(axis=1)
    

    You can use the average daily returns of the portfolio the same way that you used the daily returns of a single asset.

  3. Use the average daily returns in the etf_portfolio_returns DataFrame to calculate the annualized returns for the portfolio. Display the annualized return value of the ETF portfolio.

Hint To calculate the annualized returns, multiply the mean of the etf_portfolio_returns values by 252.

To convert the decimal values to percentages, multiply the results by 100.

  1. Use the average daily returns in the etf_portfolio_returns DataFrame to calculate the cumulative returns of the ETF portfolio.

  2. Using hvPlot, create an interactive line plot that visualizes the cumulative return values of the ETF portfolio. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.

Step 1: Write a SQL query to join each table in the portfolio into a single DataFrame. To do so, complete the following steps:¶

- Use a SQL inner join to join each table on the “time” column. Access the “time” column in the `GDOT` table via the `GDOT.time` syntax. Access the “time” columns from the other tables via similar syntax.

- Using the SQL query, read the data from the database into a Pandas DataFrame. Review the resulting DataFrame.
time open high low close volume daily_returns
994 2020-11-30 00:00:00.000000 55.87 56.0899 53.1100 53.55 361004 -0.043750
995 2020-12-01 00:00:00.000000 54.00 54.2500 52.0007 53.79 546792 0.004482
996 2020-12-02 00:00:00.000000 53.20 53.7900 50.9400 52.32 479868 -0.027328
997 2020-12-03 00:00:00.000000 52.48 54.1600 52.0200 53.76 474175 0.027523
998 2020-12-04 00:00:00.000000 53.87 54.1900 53.0850 53.86 83596 0.001860
time open high low close volume daily_returns
994 2020-11-30 00:00:00.000000 232.05 235.0000 230.3600 230.58 2111945 -0.021266
995 2020-12-01 00:00:00.000000 231.96 234.8704 231.3500 232.09 1875447 0.006549
996 2020-12-02 00:00:00.000000 232.08 238.1300 231.5822 237.75 1783965 0.024387
997 2020-12-03 00:00:00.000000 237.29 238.8500 234.6400 235.62 1701862 -0.008959
998 2020-12-04 00:00:00.000000 237.70 239.6400 236.9500 238.57 751535 0.012520
time open high low close volume daily_returns
994 2020-11-30 00:00:00.000000 212.51 215.83 207.0900 214.200 8992681 0.013629
995 2020-12-01 00:00:00.000000 217.15 220.57 214.3401 216.520 9148174 0.010831
996 2020-12-02 00:00:00.000000 215.60 215.75 210.5000 212.660 6414746 -0.017827
997 2020-12-03 00:00:00.000000 213.33 216.93 213.1100 214.680 6463339 0.009499
998 2020-12-04 00:00:00.000000 214.88 217.28 213.0100 217.235 2118319 0.011901
time open high low close volume daily_returns
994 2020-11-30 00:00:00.000000 213.00 213.5400 200.23 210.9800 10485040 -0.007153
995 2020-12-01 00:00:00.000000 212.56 212.9500 200.50 203.0000 9911165 -0.037823
996 2020-12-02 00:00:00.000000 200.13 204.0596 195.13 202.1100 9968056 -0.004384
997 2020-12-03 00:00:00.000000 207.00 208.6900 204.05 205.5300 6497836 0.016921
998 2020-12-04 00:00:00.000000 206.29 208.9500 203.58 207.6164 2820542 0.010151
GDOT GS ... PYPL SQ
open high low close volume daily_returns open high low close ... low close volume daily_returns open high low close volume daily_returns
time
2016-12-16 24.41 24.73 23.94 23.98 483544 -0.023218 242.8 243.19 238.4 238.94 ... 39.12 39.32 7298861 -0.005564 14.29 14.47 14.23 14.375 4516341 0.017339
2016-12-19 24.0 24.01 23.55 23.79 288149 -0.007923 238.34 239.74 236.26 239.13 ... 39.11 39.45 3436478 0.003306 14.34 14.6 14.3 14.36 3944657 -0.001043
2016-12-20 23.75 23.94 23.58 23.82 220341 0.001261 240.52 243.65 240.23 243.1 ... 39.26 39.74 2940991 0.007351 14.73 14.82 14.41 14.49 5207412 0.009053
2016-12-21 23.9 23.97 23.69 23.86 249189 0.001679 242.24 242.4 240.08 241.42 ... 39.82 40.09 5826704 0.008807 14.45 14.54 14.2701 14.38 3901738 -0.007591
2016-12-22 23.9 24.01 23.7 24.005 383139 0.006077 241.23 242.86 239.55 240.17 ... 39.54 39.68 4338385 -0.010227 14.33 14.34 13.9301 14.04 3874004 -0.023644
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2020-11-30 55.87 56.0899 53.11 53.55 361004 -0.04375 232.05 235.0 230.36 230.58 ... 207.09 214.2 8992681 0.013629 213.0 213.54 200.23 210.98 10485040 -0.007153
2020-12-01 54.0 54.25 52.0007 53.79 546792 0.004482 231.96 234.8704 231.35 232.09 ... 214.3401 216.52 9148174 0.010831 212.56 212.95 200.5 203.0 9911165 -0.037823
2020-12-02 53.2 53.79 50.94 52.32 479868 -0.027328 232.08 238.13 231.5822 237.75 ... 210.5 212.66 6414746 -0.017827 200.13 204.0596 195.13 202.11 9968056 -0.004384
2020-12-03 52.48 54.16 52.02 53.76 474175 0.027523 237.29 238.85 234.64 235.62 ... 213.11 214.68 6463339 0.009499 207.0 208.69 204.05 205.53 6497836 0.016921
2020-12-04 53.87 54.19 53.085 53.86 83596 0.00186 237.7 239.64 236.95 238.57 ... 213.01 217.235 2118319 0.011901 206.29 208.95 203.58 207.6164 2820542 0.010151

999 rows × 24 columns

GDOT GS ... PYPL SQ
open high low close volume daily_returns open high low close ... low close volume daily_returns open high low close volume daily_returns
time
2016-12-16 24.41 24.7300 23.9400 23.980 483544 -0.023218 242.80 243.1900 238.4000 238.94 ... 39.1200 39.320 7298861 -0.005564 14.29 14.4700 23.9400 14.3750 4516341 0.017339
2016-12-19 24.00 24.0100 23.5500 23.790 288149 -0.007923 238.34 239.7400 236.2600 239.13 ... 39.1100 39.450 3436478 0.003306 14.34 14.6000 23.5500 14.3600 3944657 -0.001043
2016-12-20 23.75 23.9400 23.5800 23.820 220341 0.001261 240.52 243.6500 240.2300 243.10 ... 39.2600 39.740 2940991 0.007351 14.73 14.8200 23.5800 14.4900 5207412 0.009053
2016-12-21 23.90 23.9700 23.6900 23.860 249189 0.001679 242.24 242.4000 240.0800 241.42 ... 39.8200 40.090 5826704 0.008807 14.45 14.5400 23.6900 14.3800 3901738 -0.007591
2016-12-22 23.90 24.0100 23.7000 24.005 383139 0.006077 241.23 242.8600 239.5500 240.17 ... 39.5400 39.680 4338385 -0.010227 14.33 14.3400 23.7000 14.0400 3874004 -0.023644
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2020-11-30 55.87 56.0899 53.1100 53.550 361004 -0.043750 232.05 235.0000 230.3600 230.58 ... 207.0900 214.200 8992681 0.013629 213.00 213.5400 53.1100 210.9800 10485040 -0.007153
2020-12-01 54.00 54.2500 52.0007 53.790 546792 0.004482 231.96 234.8704 231.3500 232.09 ... 214.3401 216.520 9148174 0.010831 212.56 212.9500 52.0007 203.0000 9911165 -0.037823
2020-12-02 53.20 53.7900 50.9400 52.320 479868 -0.027328 232.08 238.1300 231.5822 237.75 ... 210.5000 212.660 6414746 -0.017827 200.13 204.0596 50.9400 202.1100 9968056 -0.004384
2020-12-03 52.48 54.1600 52.0200 53.760 474175 0.027523 237.29 238.8500 234.6400 235.62 ... 213.1100 214.680 6463339 0.009499 207.00 208.6900 52.0200 205.5300 6497836 0.016921
2020-12-04 53.87 54.1900 53.0850 53.860 83596 0.001860 237.70 239.6400 236.9500 238.57 ... 213.0100 217.235 2118319 0.011901 206.29 208.9500 53.0850 207.6164 2820542 0.010151

999 rows × 24 columns

Step 2: Create a DataFrame that averages the “daily_returns” columns for all four assets. Review the resulting DataFrame.¶

GDOT GS PYPL SQ ETF
daily_returns daily_returns daily_returns daily_returns mean_daily_returns
time
2016-12-16 -0.023218 -0.016708 -0.005564 0.017339 -0.007038
2016-12-19 -0.007923 0.000795 0.003306 -0.001043 -0.001216
2016-12-20 0.001261 0.016602 0.007351 0.009053 0.008567
2016-12-21 0.001679 -0.006911 0.008807 -0.007591 -0.001004
2016-12-22 0.006077 -0.005178 -0.010227 -0.023644 -0.008243
... ... ... ... ... ...
2020-11-30 -0.043750 -0.021266 0.013629 -0.007153 -0.014635
2020-12-01 0.004482 0.006549 0.010831 -0.037823 -0.003990
2020-12-02 -0.027328 0.024387 -0.017827 -0.004384 -0.006288
2020-12-03 0.027523 -0.008959 0.009499 0.016921 0.011246
2020-12-04 0.001860 0.012520 0.011901 0.010151 0.009108

999 rows × 5 columns

Step 3: Use the average daily returns in the etf_portfolio_returns DataFrame to calculate the annualized returns for the portfolio. Display the annualized return value of the ETF portfolio.¶

time
2016-12-16   -177.349614
2016-12-19    -30.651790
2016-12-20    215.881372
2016-12-21    -25.298724
2016-12-22   -207.720584
                 ...    
2020-11-30   -368.802500
2020-12-01   -100.560571
2020-12-02   -158.464514
2020-12-03    283.400170
2020-12-04    229.528085
Name: mean_daily_returns, Length: 999, dtype: float64
GDOT GS PYPL SQ ETF
daily_returns daily_returns daily_returns daily_returns mean_daily_returns ann_mean_daily_returns_per
time
2016-12-16 -0.023218 -0.016708 -0.005564 0.017339 -0.007038 -177.349614
2016-12-19 -0.007923 0.000795 0.003306 -0.001043 -0.001216 -30.651790
2016-12-20 0.001261 0.016602 0.007351 0.009053 0.008567 215.881372
2016-12-21 0.001679 -0.006911 0.008807 -0.007591 -0.001004 -25.298724
2016-12-22 0.006077 -0.005178 -0.010227 -0.023644 -0.008243 -207.720584
... ... ... ... ... ... ...
2020-11-30 -0.043750 -0.021266 0.013629 -0.007153 -0.014635 -368.802500
2020-12-01 0.004482 0.006549 0.010831 -0.037823 -0.003990 -100.560571
2020-12-02 -0.027328 0.024387 -0.017827 -0.004384 -0.006288 -158.464514
2020-12-03 0.027523 -0.008959 0.009499 0.016921 0.011246 283.400170
2020-12-04 0.001860 0.012520 0.011901 0.010151 0.009108 229.528085

999 rows × 6 columns

Step 4: Use the average daily returns in the etf_portfolio_returns DataFrame to calculate the cumulative returns of the ETF portfolio.¶

time
2016-12-16   -0.007038
2016-12-19   -0.008245
2016-12-20    0.000251
2016-12-21   -0.000754
2016-12-22   -0.008990
                ...   
2020-11-30    3.374534
2020-12-01    3.357078
2020-12-02    3.329679
2020-12-03    3.378371
2020-12-04    3.418250
Name: mean_daily_returns, Length: 999, dtype: float64
GDOT GS PYPL SQ ETF
daily_returns daily_returns daily_returns daily_returns mean_daily_returns ann_mean_daily_returns_per cum_returns
time
2016-12-16 -0.023218 -0.016708 -0.005564 0.017339 -0.007038 -177.349614 -0.007038
2016-12-19 -0.007923 0.000795 0.003306 -0.001043 -0.001216 -30.651790 -0.008245
2016-12-20 0.001261 0.016602 0.007351 0.009053 0.008567 215.881372 0.000251
2016-12-21 0.001679 -0.006911 0.008807 -0.007591 -0.001004 -25.298724 -0.000754
2016-12-22 0.006077 -0.005178 -0.010227 -0.023644 -0.008243 -207.720584 -0.008990
... ... ... ... ... ... ... ...
2020-11-30 -0.043750 -0.021266 0.013629 -0.007153 -0.014635 -368.802500 3.374534
2020-12-01 0.004482 0.006549 0.010831 -0.037823 -0.003990 -100.560571 3.357078
2020-12-02 -0.027328 0.024387 -0.017827 -0.004384 -0.006288 -158.464514 3.329679
2020-12-03 0.027523 -0.008959 0.009499 0.016921 0.011246 283.400170 3.378371
2020-12-04 0.001860 0.012520 0.011901 0.010151 0.009108 229.528085 3.418250

999 rows × 7 columns

Step 5: Using hvPlot, create an interactive line plot that visualizes the cumulative return values of the ETF portfolio. Reflect the “time” column of the DataFrame on the x-axis. Make sure that you professionally style and format your visualization to enhance its readability.¶